package com.kedll.library.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;

import java.util.List;

/**
 *
 * @author QiQi
 * @date 2017/1/19
 */

public class TabLayoutFragmentPagerAdapter extends AbFragmentPagerAdapter {

    private String[] tabTitles;

    public TabLayoutFragmentPagerAdapter(FragmentManager fm, List<Fragment> fragments, String[] tabTitles) {
        super(fm, fragments);
        this.tabTitles = new String[tabTitles.length];
        System.arraycopy(tabTitles, 0, this.tabTitles, 0, tabTitles.length);
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return tabTitles[position];
    }
}
